package com.miaomiao.service.system;

import com.baomidou.mybatisplus.extension.service.IService;
import com.miaomiao.domain.system.Menu;
import com.miaomiao.domain.system.Router;
import com.miaomiao.domain.system.TreeSelect;

import java.util.List;

public interface MenuService extends IService<Menu> {

    List<Menu> selectMenuTreeByUserId(Long userId);
    List<Menu> selectMenuTreeByUserId(Menu menu,Long userId);

    List<Router> buildMenus(List<Menu> menus);

    /**
     * 构建前端所需要下拉树结构
     *
     * @param menus 菜单列表
     * @return 下拉树结构列表
     */
    public List<TreeSelect> buildMenuTreeSelect(List<Menu> menus);

    public boolean addMenu(Menu menu);

    List<Menu> getRoleMenus(Long roleId);
}
